package com.bd.controller;

import java.util.List;

import javax.faces.bean.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;

import com.bd.model.Label;

@Named
@ViewScoped
public class LabelBean {

	@Inject
	private ControllerImpl	controller;

	public List<Label> findAll() {
		List<Label> labels = controller.findAllLabels();
		Label lbl = new Label();
		labels.add(0, lbl);
		return labels;
	}

	public Label findByName(String name) {
		return controller.findLabelByName(name);
	}
}
